################################################################################
###
###	INTERTEMPORAL EVIDENCE ON THE STRATEGY OF POPULISM IN THE US (Gennaro, Lecce, Morelli)
###	Replication Package
###
### Figure 2
###
################################################################################
library(dplyr)
library(ggplot2)
library(ggpubr)
library(gridExtra)
library(cowplot)
library(patchwork)
# Indicate location of the replication package here
wd <- ("Replication Package/")
###### Results from aux_file   #################################################
lab <- c('Core Voters', 'Core Voters', 'Core Voters', 'Non Core Voters', 'Non Core Voters', 'Non Core Voters')
lab2 <- c('Intention to Vote', 'Reported Turnout', 'Validated Turnout',
'Intention to Vote', 'Reported Turnout', 'Validated Turnout')
coeff <- c( -.0188128 ,  -.0055475   ,-.0004392 ,
.0273378  , .0216864, .024917 )
std <- c(.005438, .0049166, .0039227,
.0096831, .0080918, .0086675)
n <- c('N=2171', 'N=1995','N=1587',
'N=2277', 'N=2064', 'N=1569')
n2 <- c('Mean DV=0.94', 'Mean DV=0.95', 'Mean DV=0.96',
'Mean DV=0.81', 'Mean DV=0.82', 'Mean DV=0.85')
df <-  as.data.frame(cbind(lab, lab2, coeff, std, n, n2))
df$coeff <- as.numeric(as.character(df$coeff))
df$std <- as.numeric(as.character(df$std))
df$p <- df$coeff  %>% round(digits=3)
df$std_c = paste0('[', round(df$std, digits=3), ']')
names(df) <- c('lab', 'measure', 'e', 's', 'n', 'n2', 'p', 'std_c')
View(df)
